package
{
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	public class Tab extends MovieClip
	{
		private var tab:MovieClip;
		
		public function Tab()
		{
			buttonMode = true;
			
			tab = Resource.getMovieClip("tab");
			addChild(tab);
			tab.mouseChildren = false;
			tab.addEventListener(MouseEvent.MOUSE_OVER,overHandler);
			tab.addEventListener(MouseEvent.MOUSE_OUT,outHandler);
		}
		
		public function set text(value:String):void
		{
			tab["txt"].text = value;
		}
		
		private function overHandler(e:MouseEvent):void
		{
			tab.gotoAndStop(2);
		}
		
		private function outHandler(e:MouseEvent):void
		{
			tab.gotoAndStop(1);
		}
	}
}